/*
 *  This file is part of LifeBudget - Copyright 2010 Clifton Eaton
 *  ------------------------------------------------------------------
 *  LifeBudget is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  LifeBudget is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with LifeBudget.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.lifebudget.app.persistence.dao;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import org.lifebudget.app.client.mvc.model.CategoryAmount;

import com.google.appengine.api.datastore.Key;

/**
 * The Class TransactionItemDAO. Data Access Object in for the persistence
 * layer to handle persisting a {@link TransactionItemDAO}. Annotated for JPA
 * persistence.
 */
@Entity
public class TransactionItemDAO {
	
	/** The key. */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Key key;
	
	/** The amount. */
	private double amount;
	
	/** The category id. */
	private long categoryId;
	
	/** The transaction id. */
	private long transactionId;
	
	/** The user id. */
	private String userId;

	/**
	 * Sets the key.
	 *
	 * @param key the new key
	 */
	public void setKey(Key key) {
		this.key = key;
	}

	/**
	 * Gets the key.
	 *
	 * @return the key
	 */
	public Key getKey() {
		return key;
	}

	/*
	 * public void setTransactionId(long transactionId) { this.transactionId =
	 * transactionId; } public long getTransactionId() { return transactionId; }
	 */
	/**
	 * Sets the amount.
	 *
	 * @param amount the new amount
	 */
	public void setAmount(double amount) {
		this.amount = amount;
	}

	/**
	 * Gets the amount.
	 *
	 * @return the amount
	 */
	public double getAmount() {
		return amount;
	}

	/**
	 * Sets the category id.
	 *
	 * @param categoryId the new category id
	 */
	public void setCategoryId(long categoryId) {
		this.categoryId = categoryId;
	}

	/**
	 * Gets the category id.
	 *
	 * @return the category id
	 */
	public long getCategoryId() {
		return categoryId;
	}

	/**
	 * Sets the transaction id.
	 *
	 * @param transactionId the new transaction id
	 */
	public void setTransactionId(long transactionId) {
		this.transactionId = transactionId;
	}

	/**
	 * Gets the transaction id.
	 *
	 * @return the transaction id
	 */
	public long getTransactionId() {
		return transactionId;
	}

	/**
	 * Sets the user id.
	 *
	 * @param userId the new user id
	 */
	public void setUserId(String userId) {
		this.userId = userId;
	}

	/**
	 * Gets the user id.
	 *
	 * @return the user id
	 */
	public String getUserId() {
		return userId;
	}

}
